{{#if hasBlock}}

  {{yield
      (hash
          image=(component "avatars/avatar-image")
          meta=(component "avatars/avatar-metadata")
          maxAvatars=maxAvatars
          rollupAvatars=rollupAvatars
      )
  }}

{{else}}

  <ul class="avatar-container__list">
    {{#each maxAvatars as |avatar|}}
      <li class="avatar-item avatar-item--stacked">

        {{avatars/avatar-image avatar=avatar class="avatar--stacked"}}

        {{#avatars/avatar-metadata class="avatar-item--stacked__meta" avatar=avatar as |aviMeta|}}
          {{#if aviMeta.email}}
            <a href="mailto:{{aviMeta.email}}" class="avatar-meta-action" target="_blank">
              <strong><i class="fa fa-at"></i></strong> {{aviMeta.email}}
            </a>
          {{/if}}

          {{#if aviMeta.userName}}
            <a href="slack://user?team={{aviMeta.team}}&id={{aviMeta.userName}}" class="avatar-meta-action">
              <i class="fa fa-slack"></i> {{aviMeta.userName}}
            </a>
          {{/if}}
        {{/avatars/avatar-metadata}}

      </li>
    {{/each}}
  </ul>

  {{#if rollupAvatars}}
    {{#avatars/rollup-avatars avatars=avatars avatarType=avatarType}}
      {{rollupAvatars.length}}+
    {{/avatars/rollup-avatars}}
  {{/if}}

{{/if}}